<!--
  Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.

  https://www.mall4j.com/

  未经允许，不可做商业用途！

  版权所有，侵权必究！
-->

<template>
  <div class="Mall4j page-member-center equity">
    <!-- 头部 -->
    <MemberHeader />
    <!-- /头部 -->
    <div v-if="commonLevelShow">
      <div
        v-if="commonLevelShow"
        v-rich="commonLevelShow"
        class="member-equity"
      />
    </div>
  </div>
</template>

<script setup>
import { loadTransition } from '@/utils/load-transition'
import Cookie from 'vue-cookies'
import MemberHeader from '@/components/member-header/index.vue'
loadTransition()
const router = useRouter()
const commonLevelShow = ref('')
onMounted(() => {
  // 未登录跳转到登录页
  if (!Cookie.get('bbcToken')) {
    router.replace({ path: '/login' })
  }
  // 设置网页标题
  document.title = $t('memberCenter.memberBenefits')
  getComLevelShow()
})

/**
 * 普通会员等级
 */
const getComLevelShow = () => {
  http.get('/p/score/getLevelShow').then(({ data }) => {
    commonLevelShow.value = data
  })
}

</script>

<style lang="scss" scoped>
@use './index.scss';
@use '../index.scss' as index-mc ;
</style>
